<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- 
    JSP Name : ma_100_07.jsp
    Description : 팝업 미리보기
    author Seung Won
    since 2012. 09. 06.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 8. 8.     Seung Hun     최초 생성
--%>
<%@ include file="/WEB-INF/jsp/co/mn/include/declare.jspf" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/WEB-INF/jsp/co/mn/include/header.jspf" %>
<script type="text/javaScript" language="javascript">

/*
 * 쿠키 설정
 */
function setCookie(name, value, expiredays) { 
    var todayDate = new Date(); 
    todayDate.setDate( todayDate.getDate() + expiredays ); 
    document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + "; domain=${rqInfo.domain}";
} 

/*
 * 쿠키값 얻어오기
 */
function getCookie(name) { 
    var nameOfCookie = name + "=";
    var x = 0;
    
    while ( x <= document.cookie.length ){
        var y = (x+nameOfCookie.length);
        if ( document.cookie.substring( x, y ) == nameOfCookie ) {
            if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
                endOfCookie = document.cookie.length;
            return unescape( document.cookie.substring( y, endOfCookie ) );
            }
        x = document.cookie.indexOf( " ", x ) + 1;
        
        if ( x == 0 )
            break;
        }
    return "";
} 

/*
 * 창 닫기
 */
function closeWin()  {
    
    if ( $("#popClose").is(":checked") == true ) {
        setCookie("pop${result.popuIdx}", "no" , 1);   
    } 

    top.close();
}
</script>
</head>
<body>
<div class="popWrap">
    <div class="popBody">
        ${result.sbc }
    </div>
    <c:if test="${result.filNm != null }">
        <a href="#" onclick="getUpFileDownload('0040','${result.popuIdx}');return false;">${result.filNm }</a>
    </c:if>
    <form name="cnjform" action="">
        <p class="winClose"><label for="popClose"><input type="checkbox" name="cookieCheck" id="popClose" onclick="closeWin();" />오늘하루 보지 않기</label><button type="button" onclick="javascript:window.close();">닫기</button></p>
    </form>
</div>
<form id="downloadForm" name="downloadForm" method="post">
    <input type="hidden" id="menuScn" name="menuScn" value="" />
    <input type="hidden" id="idx" name="idx" value="" />
    <input type="hidden" id="filNm" name="filNm" value="" />
</form>
</body>
</html>